<template>
	<view class="wallet dFlex jCenter_aCenter flexDirection">
		<view class="walletIcon imgPublic">
			<image src="../static/images/wdlqtb@2x.png" mode="widthFix"></image>
		</view>
		<text>我的零钱</text>
		<view class="amount">￥<text>{{datas.vip_rechage_balance ? datas.vip_rechage_balance : '0.00'}}</text></view>
		<navigator url="./recharge" hover-class="none" class="recharge">立即充值</navigator>
		<navigator url="./definite" hover-class="none" class="mingxi">零钱明细</navigator>
	</view>
</template>

<script>
	import {
		info
	} from '@/tools/http.js';
	export default {
		data() {
			return {
				datas:{},
			};
		},
		onShow(){
			this.initUser();
		},
		methods:{
			// 用户信息
			async initUser(){
				let res = await info({});
				if(res){
					this.datas = res;
				}
			},
		}
	}
</script>

<style lang="scss">
	page{
		background: white;
		height:100%;
	}
	.wallet{
		width:100%;
		height:100%;
		.walletIcon{
			width:50px;
			height:50px;
			margin-bottom: 35px;
		}
		.amount{
			font-weight: bold;
			font-size: 20px;
			margin-top:25px;
			text{
				font-size:28px;
			}
		}
		.mingxi{
			width: 100%;
			text-align:center;
			font-size: 12px;
			color:#3E8EF0;
		}
		.recharge{
			width: max-content;
			margin: 30px auto 15px;
			color:white;
			padding: 8px 60px;
			border-radius: 50px;
			background: linear-gradient(180deg, #3E8EF0 0%, #1362C9 100%);
		}
	}
</style>
